/*
 *	Copyright © 2013 Changsha Shishuo Network Technology Co., Ltd. All rights reserved.
 *	长沙市师说网络科技有限公司 版权所有
 *	http://www.shishuo.com
 */
package com.hlingsoft.kkh.dao;

import com.hlingsoft.kkh.entity.ApplicationHistory;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 管理员
 *
 * @author Zhangjiale
 */

@Repository
public interface AdminApplicationDao {

    // ///////////////////////////////
    // ///// 增加 ////////
    // ///////////////////////////////

    /**
     * 添加job
     *
     * @return Integer
     */
    public int add(ApplicationHistory applicationHistory);

    public int deleteUserApplication(@Param("applicationId") long applicationId);
    public int deleteMerchantApplication(@Param("applicationId") long applicationId);

    public int updateUserApplication(ApplicationHistory applicationHistory);

    public int updateMerchantApplication(ApplicationHistory applicationHistory);

    public int addMerchantMessage(ApplicationHistory applicationHistory);



    public ApplicationHistory getUserApplicationByJobIdAndResumeId(@Param("jobId") long jobId,@Param("resumeId") long resumeId);

    public ApplicationHistory getMerchantApplicationByJobIdAndResumeId(@Param("jobId") long jobId,@Param("resumeId") long resumeId);

    public ApplicationHistory getUserApplicationByApplicationId(@Param("applicationId") long applicationId);

    public ApplicationHistory getMerchantApplicationByApplicationId(@Param("applicationId") long applicationId);

    public List<ApplicationHistory> listByUserIdByStatus(@Param("appUserId") long appUserId, @Param("status") String status, @Param("offset") long offset,
                                                         @Param("rows") long rows);

    public List<ApplicationHistory> listByUserId(@Param("appUserId") long appUserId, @Param("offset") long offset,
                                                 @Param("rows") long rows);

    public List<ApplicationHistory> listByMerchantIdByStatus(@Param("merchantId") long merchantId, @Param("status") String status, @Param("offset") long offset,
                                                             @Param("rows") long rows);

    public List<ApplicationHistory> listByUserNotDone(@Param("appUserId") long appUserId, @Param("offset") long offset,
                                                             @Param("rows") long rows);

    public List<ApplicationHistory> listByMerchantId(@Param("merchantId") long merchantId, @Param("offset") long offset,
                                                     @Param("rows") long rows);
    public List<ApplicationHistory> listByMerchantNotDone(@Param("merchantId") long merchantId, @Param("offset") long offset,
                                                     @Param("rows") long rows);


}
